package com.gsit.omega.ea.domain;

import java.util.Calendar;

import javax.persistence.Enumerated;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;

import com.gsit.omega.ea.utils.EmployeeAttendanceStatus;

@RooJavaBean
@RooToString
@RooEntity
public class EmployeeAttendance {

    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(style = "M-")
    @NotNull
    private Calendar attendanceDate;

    @NotNull
    private Integer hours;
    
    @ManyToOne
    @NotNull
    private Project project;
    
    @ManyToOne
    private User user;
    
    
    @Enumerated
    private EmployeeAttendanceStatus status;
}
